package com.znsd.entity;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;

/**
 * <p>
 * 优惠券详情表
 * </p>
 *
 * @author Liuyl
 * @since 2019-10-16
 */
public class Coupon extends Model<Coupon> {

    private static final long serialVersionUID = 1L;

    /**
     * 优惠卷Id
     */
    @TableId(value = "coupon_id", type = IdType.AUTO)
    private Long couponId;
    /**
     * 优惠类型（满减为 ：1，  折扣为：2）
     */
    @TableField("type_id")
    private Integer typeId;
    /**
     * 优惠卷名称
     */
    @TableField("coupon_name")
    private String couponName;
    /**
     * 优惠卷开始时间
     */
    @TableField("start_time")
    private Date startTime;
    /**
     * 优惠卷结束时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 优惠金额
     */
    private BigDecimal money;
    /**
     * 状态（0：待使用，1：已使用，-1：已过期）
     */
    private Integer status;
    /**
     * 优惠卷说明
     */
    private String remarks;
    /**
     * 金额满
     */
    @TableField("full_money")
    private BigDecimal fullMoney;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 图片的URL
     */
    private String img;
    /**
     * 所属区域  （默认是0：全场卷，其他的填所属Id）
     */
    @TableField("region_id")
    private Long regionId;
    /**
     * 优惠卷数量
     */
    private Long count;


    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getCouponName() {
        return couponName;
    }

    public void setCouponName(String couponName) {
        this.couponName = couponName;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public BigDecimal getFullMoney() {
        return fullMoney;
    }

    public void setFullMoney(BigDecimal fullMoney) {
        this.fullMoney = fullMoney;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Long getRegionId() {
        return regionId;
    }

    public void setRegionId(Long regionId) {
        this.regionId = regionId;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    @Override
    protected Serializable pkVal() {
        return this.couponId;
    }

    @Override
    public String toString() {
        return "Coupon{" +
        "couponId=" + couponId +
        ", typeId=" + typeId +
        ", couponName=" + couponName +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", money=" + money +
        ", status=" + status +
        ", remarks=" + remarks +
        ", fullMoney=" + fullMoney +
        ", createTime=" + createTime +
        ", img=" + img +
        ", regionId=" + regionId +
        ", count=" + count +
        "}";
    }
}
